using System;
using System.Text;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using emp.Model;
using emp.BLL;
using emp.IDAL;
using System.Collections.Generic;
using System.Collections;

namespace emp.ProcessFlow
{
    public class DDRController
    {
        public bool CreateDDR(DDRInfo ddrinfo)
        {

            try
            {
                DDR ddr = new DDR();

                ddr.Insert(ddrinfo);

            }
            catch
            {
                return false;
            }

            return true;
        }


        public bool UpdateDDR(DDRInfo ddrinfo)
        {

            try
            {
                DDR ddr = new DDR();

                ddr.Update(ddrinfo);

            }
            catch
            {
                return false;
            }

            return true;
        }


        public bool DeleteDDR(int ddr_id)
        {

            try
            {
                DDR ddr = new DDR();

                ddr.Delete(ddr_id);

            }
            catch
            {
                return false;
            }

            return true;
        }





        public IList getDDRList(int DDR_Source_ID)
        {
            DDR ddr = new DDR();
            return ddr.getDDRList(DDR_Source_ID);
        }

        public DDRInfo getDDRInfo(int DDR_ID)
        {
            DDR ddr = new DDR();
            return ddr.getDDRInfo(DDR_ID);
        }
    }
}
